<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>layui</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="../../../statics/layui/css/layui.css">
    <!-- 注意：如果你直接复制所有代码到本地，上述css路径需要改成你本地的 -->
</head>
<body>
<form class="layui-form searchForm">
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label" style="width: 100px;">字典名称：</label>
            <div class="layui-input-inline">
                <input type="text" name="name" id="name" autocomplete="off" class="layui-input">
            </div>
        </div>

    </div>
</form>
<table class="layui-hide" id="dataList" lay-filter="dataList"></table>

<script type="text/html" id="toolbarOrg">
    <div class="layui-btn-container">
        <button class="layui-btn layui-btn-sm" onclick="xadmin.open(this);" title="添加数据" url="editDict.html" w="500"
                h="580" full="">添加数据
        </button>
        <button class="layui-btn layui-btn-sm" lay-event="delList">批量删除</button>
        <button class="layui-btn layui-btn-sm layui-btn-normal" lay-event="groupManage">字典分组管理</button>
    </div>
</script>

<script type="text/html" id="barDemo">
    <a class="layui-btn layui-btn-xs" onclick="xadmin.open(this);" lay-event="edit" title="编辑数据" url="editDict.html"
       w="500" h="580" full="" data-id="{{d.id}}">编辑</a>
    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
</script>

<script type="text/javascript" src="/lib/layui/layui.js"></script>
<script src="/static/js/main.js"></script>
<script>
    var configureCom = {};
    layui.use(['configureCom'], function () {
        configureCom = layui.configureCom;
        var cols = [[
            {type: 'checkbox', fixed: 'left'},
            {field: 'id', title: 'id'},
            {field: 'name', title: '字典名称'},
            {field: 'value', title: '字典值'},
            {field: 'groupName', title: '所属分组'},
            {field: 'code', title: '字典编码'},
            {fixed: 'right', title: '操作', toolbar: '#barDemo', width: 150}
        ]];
        var data = {
            name: '',
            value: '',
            groupId: ''
        };
        configureCom.tableRender(baseApi+'/act/remodel/list', {}, cols,'dataList',10,'full-100','toolbarOrg');
    });

</script>
</body>
</html>